import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { EquipmentDetailComponent } from './detail/detail';
import { EquipmentComponent } from './index/equipment';

const routes: Routes = [
	{
		path: '',
		children: [
			{
				path: '',
				redirectTo: 'index',
			},
			{
				path: 'index',
				component: EquipmentComponent,
				data: {
					title: '接入设备管理',
					url: 'equipment/index',
				},
			},
			{
				path: 'detail',
				component: EquipmentDetailComponent,
				data: {
					title: '接入设备管理',
					url: 'equipment/detail',
				},
			},
			{
				path: '**',
				redirectTo: 'home',
			},
		],
	},
];

@NgModule({
	imports: [RouterModule.forChild(routes)],
	exports: [RouterModule],
})
export class EquipmentRoutingModule { }
